<template>
    <div class="leftSidebar">
        <el-menu default-active="0" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose"
                 :collapse="isCollapse">
            <el-menu-item index="0" class="main_item">
<!--                <i class="el-icon-user-solid"></i>-->
<!--                <el-avatar shape="square" src="Me.JPG" menu-trigger="hover"></el-avatar>-->
                <span>One_Blog</span>
            </el-menu-item>
            <el-menu-item index="1">
                <i class="el-icon-menu"></i>
                <span slot="title">仪表盘</span>
            </el-menu-item>
            <el-menu-item index="2">
                <i class="el-icon-menu"></i>
                <span slot="title">文章发布</span>
            </el-menu-item>
            <el-menu-item index="3">
                <i class="el-icon-document"></i>
                <span slot="title">文章管理</span>
            </el-menu-item>
            <el-menu-item index="4">
                <i class="el-icon-setting"></i>
                <span slot="title">评论管理</span>
            </el-menu-item>
            <el-menu-item index="5">
                <i class="el-icon-setting"></i>
                <span slot="title">评论管理</span>
            </el-menu-item>
            <el-menu-item index="6">
                <i class="el-icon-setting"></i>
                <span slot="title">评论管理</span>
            </el-menu-item>
        </el-menu>
    </div>
</template>

<script>
    export default {
        name: "Sidebar",
        props: ['isCollapse'],
        methods: {
            handleOpen(key, keyPath) {
                console.log(key, keyPath);
            },
            handleClose(key, keyPath) {
                console.log(key, keyPath);
            }
        }
    }
</script>

<style scoped>
    .el-menu{
        width: 100px;
    }
    .main_item {
        line-height: 80px;
        text-align: center;
    }
    .main_item span{
        font-size: 25px;
        margin-left: 10px;
    }
    .el-menu-item{
        height: 80px;
        text-align: center;
    }
    .el-menu-vertical-demo{
        width: 100px;
    }
    .el-menu-vertical-demo:not(.el-menu--collapse) {
        height: 80px;
        width: 200px;
        min-height: 400px;
    }
</style>